package com.example.flutter_world_cup.demo

class LambdaTest {
    val sum: (Int, Int) -> Int = { a, b -> a + b }
    val list = listOf(1, 2, 3, 4, 5)
    val doubled = list.map { it * 2 } // 使用 lambda 表达式将列表中的每个元素乘以 2
}

fun main() {
    val lambdaTest = LambdaTest()
    println(lambdaTest.doubled)
}